package org.agile4j.rpc.registry.zookeeper;

import java.util.List;

import org.I0Itec.zkclient.IZkChildListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 订阅节点的信息改变（创建节点，删除节点，添加子节点）监听
 * @author Administrator
 *
 */
public class ZookeeperChildListener implements IZkChildListener{

	private static final Logger LOGGER = LoggerFactory.getLogger(ZookeeperChildListener.class) ;
	
	/** 
     * 用来处理服务器端发送过来的通知 
     * parentPath：对应的父节点的路径 
     * currentChilds：子节点的相对路径 
     */
	@Override
	public void handleChildChange(String parentPath, List<String> currentChilds) throws Exception {
		LOGGER.debug(parentPath);
		LOGGER.debug(String.valueOf(currentChilds));
	}

}
